<!DOCTYPE html>
<body>
  <div style="position: relative">
    <div style="display: inline-block">
      <span id=abs style="position: absolute"></span>
    </div>
  </div>
<script>
if (window.testRunner)
  testRunner.dumpAsText();

document.body.offsetTop;
abs.style.top = '0';
</script>
</body>
